feat(Toast): allow action without dismissing toast#2673
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds a ChangesToastAction closeOnClick feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/content/docs/components/toast.md`:
- Around line 142-154: The keyboard-interaction docs incorrectly state that
ToastAction always closes on Space/Enter; update the keyboard table and any
related text to qualify that closing on Space/Enter is conditional on the prop
closeOnClick being true. Locate mentions of ToastAction and the keyboard table
in this doc (references: ToastAction, closeOnClick) and change the wording to
something like "closes on Space/Enter when closeOnClick === true" or equivalent
concise phrasing so the docs consistently reflect the conditional behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d67d0a50-1ec0-455c-a938-42671e607cc2
📒 Files selected for processing (4)
docs/content/docs/components/toast.mddocs/content/meta/ToastAction.mdpackages/core/src/Toast/Toast.test.tspackages/core/src/Toast/ToastAction.vue
🔗 Linked issue
Resolves #2626
❓ Type of change
📚 Description
Adds a
closeOnClickprop toToastActionso action buttons can run without always dismissing their toast. The default remainstrue, preserving the existing dismiss-on-click behavior.This also documents the new prop and adds a regression test covering
closeOnClick: falsekeeping the toast open after clicking the action.📸 Screenshots (if appropriate)
N/A
📝 Checklist
Summary by CodeRabbit
New Features
Changes
Documentation
Tests